package cn.yiyuan.car.entity;

import cn.yiyuan.base.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class CarTypeEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;
    private String name;
    private String icon;
    /**
     * 排序用
     */
    private Integer index;
    private String description;
    /**
     * 父类型id
     */
    private Long pid;

    private List<CarTypeEntity> children = new ArrayList<>();    // 子类型,一个父类型下有多个子类型

}